package cn.jsu.oj.judgment.pojo;

import cn.jsu.oj.judgment.parsing.NoDeserialize;
import cn.jsu.oj.judgment.parsing.NoSerialize;
import cn.jsu.oj.judgment.parsing.PackType;

/**
 * @author: suixuexue
 * @date: 2020/11/11 21:01
 * describe:
 *                 判题机的解包顺序
 *      *          1.langVer
 *      *          2.mod
 *      *          3.tId
 *      *          4.sNumber
 *      *          5.code.cpp
 *      *          6.time
 *      *          7.memory
 */
@PackType(typeNo = 12)
public class TaskInfo extends AbstractPack {

    /**
     * 是否是优先任务
     */
    private boolean taskPriority;
    /**
     * 语言类型
     */
    private byte languageType;
    /**
     * 判题模式
     */
    private byte judgeModel;
    /**
     * 题目id
     */
    private String subjectId;
    /**
     * 流水号
     */
    private long serialNumber;
    /**
     * 源代码
     */
    private String sourceCode;
    /**
     * 任务权值
     */
    private int taskWeight;
    /**
     * 最大运行时间
     */
    private int maxRunningTime;
    /**
     * 最大运行内存kb
     */
    private int maxRunningMemory;

    public TaskInfo()
    {
    }

    public TaskInfo(boolean taskPriority, byte languageType, byte judgeModel, String subjectId, long serialNumber, String sourceCode, int taskWeight, int maxRunningTime, int maxRunningMemory)
    {
        this.taskPriority = taskPriority;
        this.languageType = languageType;
        this.judgeModel = judgeModel;
        this.subjectId = subjectId;
        this.serialNumber = serialNumber;
        this.sourceCode = sourceCode;
        this.taskWeight = taskWeight;
        this.maxRunningTime = maxRunningTime;
        this.maxRunningMemory = maxRunningMemory;
    }

    public boolean isTaskPriority()
    {
        return taskPriority;
    }

    public void setTaskPriority(boolean taskPriority)
    {
        this.taskPriority = taskPriority;
    }

    public byte getLanguageType()
    {
        return languageType;
    }

    public void setLanguageType(byte languageType)
    {
        this.languageType = languageType;
    }

    public byte getJudgeModel()
    {
        return judgeModel;
    }

    public void setJudgeModel(byte judgeModel)
    {
        this.judgeModel = judgeModel;
    }

    public String getSubjectId()
    {
        return subjectId;
    }

    public void setSubjectId(String subjectId)
    {
        this.subjectId = subjectId;
    }

    public long getSerialNumber()
    {
        return serialNumber;
    }

    public void setSerialNumber(long serialNumber)
    {
        this.serialNumber = serialNumber;
    }

    public String getSourceCode()
    {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode)
    {
        this.sourceCode = sourceCode;
    }

    public int getTaskWeight()
    {
        return taskWeight;
    }

    public void setTaskWeight(int taskWeight)
    {
        this.taskWeight = taskWeight;
    }

    public int getMaxRunningTime()
    {
        return maxRunningTime;
    }

    public void setMaxRunningTime(int maxRunningTime)
    {
        this.maxRunningTime = maxRunningTime;
    }

    public int getMaxRunningMemory()
    {
        return maxRunningMemory;
    }

    public void setMaxRunningMemory(int maxRunningMemory)
    {
        this.maxRunningMemory = maxRunningMemory;
    }

    @Override
    public String toString()
    {
        return "QuestionTaskInformation{" +
                "taskPriority=" + taskPriority +
                ", languageType=" + languageType +
                ", judgeModel=" + judgeModel +
                ", subjectId='" + subjectId + '\'' +
                ", serialNumber=" + serialNumber +
                ", sourceCode='" + sourceCode + '\'' +
                ", taskWeight=" + taskWeight +
                ", maxRunningTime=" + maxRunningTime +
                ", maxRunningMemory=" + maxRunningMemory +
                '}';
    }
}
